---
title: Modules
subtitle: Overview of Apollo Kotlin modules
description: Explore Apollo Kotlin's modular architecture and customize your setup by selecting only the features you need. Learn about the main, deprecated, and internal modules, and understand how they contribute to optimizing performance and maintainability.
---

Apollo Kotlin is highly modular, making it easy to only include the features that you use and exclude the others, keeping your binary size and compile times small.

All the modules are documented in the [KDoc API reference](https://apollographql.github.io/apollo-kotlin/kdoc/)

## Main modules

### apollo-annotations

`apollo-annotations` is a very small module that contains `@ApolloExperimental` and other annotations mainly useful for handling API lifecycle.

It is an API dependency of most of the other modules.

### apollo-api

`apollo-api` contains the bare minimum symbols to compile the generated code and parse responses.

It does not contain any networking or caching code. For a more complete artifact, see `apollo-runtime`. 

See ["Using the models without apollo-runtime"](https://www.apollographql.com/docs/kotlin/advanced/no-runtime) for how to use `apollo-api`.

### apollo-ast

`apollo-ast` contains code to parse GraphQL documents and manipulate their Abstract Syntax Tree.

See ["Apollo AST"](https://www.apollographql.com/docs/kotlin/advanced/apollo-ast) for how to use `apollo-ast`.

### apollo-compiler

`apollo-compiler` is the low level compiler API used by apollo-gradle-plugin.

`apollo-compiler` uses [JavaPoet](https://github.com/square/javapoet) and [KotlinPoet](https://github.com/square/kotlinpoet) to generate Java and Kotlin models from GraphQL operations.

`apollo-compiler` is usually consumed through Gradle or Maven plugins. It also contains `ApolloCompilerPlugin`.

See ["Apollo Compiler plugins"](https://www.apollographql.com/docs/kotlin/advanced/compiler-plugins) for how to develop compiler plugins.

### apollo-debug-server

`apollo-debug-server` is a server that serves your normalized cache to the IntelliJ/Android Studio plugin.

### apollo-gradle-plugin

`apollo-gradle-plugin` contains the Apollo Gradle plugin.

This module shadows and relocates its runtime dependencies to avoid classpath issues. This can make debugging harder in some cases.

See `apollo-gradle-plugin-external` for a version of `apollo-gradle-plugin` that does not shadow its dependencies.

See ["Gradle Plugin Configuration"](https://www.apollographql.com/docs/kotlin/advanced/plugin-configuration/) for how to use the Gradle plugin.

### apollo-gradle-plugin-external

`apollo-gradle-plugin-external` contains the Apollo Gradle plugin.

This module does not shadow its runtime dependencies, making it more prone to Gradle classpath issues.

See `apollo-gradle-plugin` for a version of `apollo-gradle-plugin-external` that shadow its dependencies.

See ["Gradle Plugin Configuration"](https://www.apollographql.com/docs/kotlin/advanced/plugin-configuration/) for how to use the Gradle plugin.

### apollo-http-cache

apollo-http-cache is a HTTP cache for your GraphQL operations. Compared to a regular HTTP cache, it also caches POST requests.

See ["HTTP cache"](https://www.apollographql.com/docs/kotlin/caching/http-cache) for how to use the HTTP cache

### apollo-normalized-cache

`apollo-normalized-cache contains` `ApolloStore` and `ApolloCacheInterceptor`. It bridges `ApolloClient` and `ApolloNormalizedCache`.

See ["Normalized Caches"](https://www.apollographql.com/docs/kotlin/caching/normalized-cache#in-memory-cache) for how to use the normalized cache.

### apollo-normalized-cache-api

`apollo-normalized-cache-api` is the low-level cache. It knows nothing about coroutines and/or `apollo-runtime` and contains a memory implementation of `NormalizedCache`.

Most of the time, use `apollo-normalized-cache` instead.

See ["Normalized Caches"](https://www.apollographql.com/docs/kotlin/caching/normalized-cache#in-memory-cache) for how to use the normalized cache.

### apollo-normalized-cache-sqlite

`apollo-normalized-cache-sqlite` contains an implementation of `NormalizedCache` that uses SQLite to persist the data across app restarts.

See ["Normalized Caches"](https://www.apollographql.com/docs/kotlin/caching/normalized-cache#in-memory-cache) for how to use the normalized cache.

### apollo-runtime

`apollo-runtime` contains `ApolloClient`, networking code to execute your queries and subscriptions. This is the main entry point.

See ["Get Started"](https://www.apollographql.com/docs/kotlin/) for how to instantiate and use an `ApolloClient`.

### apollo-testing-support

`apollo-testing-support` contains:

* `QueueTestNetworkTransport` and `MapTestNetworkTransport` for testing without a mock server.
* a set of helper functions used for Apollo tests. They were never really intended to become public and will be removed in a future version. These symbols are marked as deprecated. If you are using them, copy paste them in your project.

See ["Mocking GraphQL responses"](https://www.apollographql.com/docs/kotlin/testing/mocking-graphql-responses) for how to use test network transports.

## Deprecated modules

These modules are deprecated and will be removed in a future version. 

### apollo-adapters (DEPRECATED)

`apollo-adapters` contains adapters for common date and big decimal GraphQL scalars.

This module is deprecated and moved to the Apollo Galaxy. See the [Apollo Galaxy page](https://www.apollographql.com/docs/kotlin/advanced/galaxy) for more details.  

### apollo-api-java (DEPRECATED)

`apollo-api-java` contains the symbols needed to compile the Java models.

This module is deprecated and moved to the Apollo Galaxy. See the [Apollo Galaxy page](https://www.apollographql.com/docs/kotlin/advanced/galaxy) for more details.

### apollo-engine-ktor (DEPRECATED)

`apollo-engine-ktor` is an implementation of `HttpEngine` and `WebSocketEngine` that uses Ktor.

This module is deprecated and moved to the Apollo Galaxy. See the [Apollo Galaxy page](https://www.apollographql.com/docs/kotlin/advanced/galaxy) for more details.

### apollo-idling-resource (DEPRECATED)

`apollo-idling-resource` contains an [Espresso `IdlingResource`](https://developer.android.com/training/testing/espresso/idling-resource) that monitors calls to your GraphQL API.

This module is deprecated as we recommend you should wait for your UI to change instead. See [this article about ways to do so](https://medium.com/androiddevelopers/alternatives-to-idling-resources-in-compose-tests-8ae71f9fc473).

### apollo-mockserver (DEPRECATED)

`apollo-mockserver` is a HTTP server for your tests. It supports multiplatform and websockets.

The API is minimal and performance is a non-goal. Do not use for production APIs.

This module is deprecated and moved to the Apollo Galaxy. See the [Apollo Galaxy page](https://www.apollographql.com/docs/kotlin/advanced/galaxy) for more details.

### apollo-runtime-java (DEPRECATED)

`apollo-runtime-java` is an implementation of `ApolloClient` that doesn't use coroutines and more generally is more friendly for Java callers.

This module is deprecated and moved to the Apollo Galaxy. See the [Apollo Galaxy page](https://www.apollographql.com/docs/kotlin/advanced/galaxy) for more details.

### apollo-rx2-support (DEPRECATED)

`apollo-rx2-support` provides thin wrappers around [`kotlinx-coroutines-rx2`](https://github.com/Kotlin/kotlinx.coroutines/tree/master/reactive/kotlinx-coroutines-rx2).

This module is deprecated and will be removed in a future version.

### apollo-rx3-support (DEPRECATED)

`apollo-rx3-support` provides thin wrappers around [`kotlinx-coroutines-rx3`](https://github.com/Kotlin/kotlinx.coroutines/tree/master/reactive/kotlinx-coroutines-rx3).

This module is deprecated and will be removed in a future version.

### apollo-rx2-support-java (DEPRECATED)

`apollo-rx2-support-java` provides adapter from `ApolloCall` to their RxJava3 equivalent.

This module is deprecated and moved to the Apollo Galaxy. See the [Apollo Galaxy page](https://www.apollographql.com/docs/kotlin/advanced/galaxy) for more details.

### apollo-rx3-support-java (DEPRECATED)

`apollo-rx3-support-java` provides adapter from `ApolloCall` to their RxJava3 equivalent.

This module is deprecated and moved to the Apollo Galaxy. See the [Apollo Galaxy page](https://www.apollographql.com/docs/kotlin/advanced/galaxy) for more details.

## Internal modules

These modules are published for technical reasons only. Most of their symbols are `@ApolloInternal` and they might be removed at any time. Avoid using them.

### apollo-mockserver (INTERNAL)

`apollo-mpp-utils` contains a few utilities for working with multiplatform projects.

As of June 2024, it only contains `currentTimeMillis`. In most cases, we should replace that with `kotlin.time.TimeMark` but it's still used in `HttpInfo` as absolute timestamps, and we can't remove it just yet.

This module is published for technical reasons only. Do not use directly.

### apollo-tooling (INTERNAL)

`apollo-tooling` contains APIs to work with GraphQL schemas and operations as well as the GraphOS API. It is used from the CLI and Gradle plugin

This module is published for technical reasons only. Do not use directly.